package com.symaster.pdfcompose;

import org.apache.pdfbox.multipdf.PDFMergerUtility;

import java.io.File;

/**
 * @author yinmiao
 * @version 2024/4/25
 */
public class Test {

    public static void main(String[] args) throws Exception {

        // toPDF("C:\\Users\\18790\\Pictures\\微信图片_20230724153057.jpg");

        PDFMergerUtility pdfMerger = new PDFMergerUtility();

        pdfMerger.addSource(new File("C:\\Users\\18790\\Pictures\\剖面节点图01.pdf"));
        pdfMerger.addSource(new File("C:\\Users\\18790\\Pictures\\剖面节点图02.pdf"));
        pdfMerger.addSource(new File("C:\\Users\\18790\\Pictures\\剖面节点图03.pdf"));
        pdfMerger.addSource(new File("C:\\Users\\18790\\Pictures\\剖面节点图04.pdf"));
        // pdfMerger.addSource(toPDF("E:\\target\\WeChat Files\\WeChat Files\\wxid_9vealziaic3e22\\FileStorage\\File\\2024-04\\酒店PDF\\C-玄关-20240419-225841.jpg"));
        // pdfMerger.addSource(new File("E:\\sync\\图纸文件\\RC飞机\\CROW_RACER\\CrowRacer_User_Guide.pdf"));

        pdfMerger.setDestinationFileName("E:\\projects\\symaster\\pdf-compose\\target\\out.pdf");
        pdfMerger.mergeDocuments(null);
    }


}
